package com.skyhub.common.utils.userContext;

import com.skyhub.common.domain.pojo.User;
import org.springframework.stereotype.Component;

@Component
public class UserContext {
    ThreadLocal<User>local=new ThreadLocal<>();
    public void setUser(User user){
        local.set(user);
    }
    public User getUser(){
        return local.get();
    }
}
